home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / mmatch / memory.gbl < prev    next >
Text File  |  1995-09-06  |  12KB  |  244 lines

  1. DefInt A-Z
  2.      
  3.     Global CARD$(48)
  4.     Global A$(24)
  5.     Global UPBUTTON$, NUMFLAGS, MATCHES, GAMEBOARD
  6.      
  7.     Global BUTTON1, BUTTON2, TRIES, PICKED
  8.  
  9.     
  10. Global Const TRUE = -1, FALSE = 0
  11.  
  12.     Type SCORERECORD
  13.     WINNER      As String * 30
  14.     POINTS      As Integer
  15.     DMY         As String * 20
  16.     End Type
  17.  
  18.     Global SCORE As SCORERECORD
  19.  
  20.  
  21. '--------------------------------------------------------------------------
  22. ' These are the user-defined TYPE declarations for VBTOOLS.VBX
  23.  
  24.     Type WinFlags
  25.  
  26.       WF_80x87 As Integer ' True or false
  27.       WF_CPU   As Integer ' 86,186,286,386,486
  28.       WF_MODE  As Integer ' 1=Standard,2=386 enhanced
  29.       WF_FRAME As Integer ' 1=EMS large-frame, 2=EMS small-frame
  30.  
  31.     End Type
  32. '--------------------------------------------------------------------------
  33. ' These are the SUB and FUNCTION declarations for VBTOOLS.VBX
  34.   
  35.     Declare Function Bload% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&)
  36.     Declare Function Bsave% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&)
  37.     Declare Function CVDMBF# Lib "vbtools.vbx" (Doub$)
  38.     Declare Function CVSMBF! Lib "vbtools.vbx" (Float$)
  39.     Declare Function CVI% Lib "vbtools.vbx" (ByVal Lin$)
  40.     Declare Function CVL& Lib "vbtools.vbx" (ByVal Lin$)
  41.     Declare Function CVS! Lib "vbtools.vbx" (ByVal Lin$)
  42.     Declare Function CVC@ Lib "vbtools.vbx" (ByVal Lin$)
  43.     Declare Function CVD# Lib "vbtools.vbx" (ByVal Lin$)
  44.     Declare Function MhBlue% Lib "vbtools.vbx" (ByVal xColor&)
  45.     Declare Function MhDefaultDrive% Lib "vbtools.vbx" ()
  46.     Declare Function MhDirectoryExists% Lib "vbtools.vbx" (A$)
  47.     Declare Function MhEcode% Lib "vbtools.vbx" ()
  48.     Declare Function MhExeName$ Lib "vbtools.vbx" (ByVal Hwnd As Integer)
  49.     Declare Function MHEXEPATH$ Lib "vbtools.vbx" (ByVal Hwnd As Integer)
  50.     Declare Function MhFileExists% Lib "vbtools.vbx" (A$)
  51.     Declare Function MhFileDateCompare% Lib "vbtools.vbx" (ByVal F1$, ByVal F2$)
  52.     Declare Function MhGreen% Lib "vbtools.vbx" (ByVal xColor&)
  53.     Declare Function MhKillFiles% Lib "vbtools.vbx" (ByVal Attr%, A$)
  54.     Declare Function MhRed% Lib "vbtools.vbx" (ByVal xColor&)
  55.     Declare Sub MhRgb Lib "vbtools.vbx" (ByVal xColor&, Red%, Green%, Blue%)
  56.     Declare Sub MhScrMono Lib "vbtools.vbx" (ByVal Lin$, ByVal Row%, ByVal Col%, ByVal Attr%)
  57.     Declare Function MhSetDefaultDrive% Lib "vbtools.vbx" (ByVal A%)
  58.     Declare Function MhSystemDir$ Lib "vbtools.vbx" ()
  59.     Declare Function MhWinDir$ Lib "vbtools.vbx" ()
  60.     Declare Sub MhWinFlags Lib "vbtools.vbx" (WindowsFlags As WinFlags)
  61.     Declare Function MhWinVersion% Lib "vbtools.vbx" (Major%, Minor%)
  62.     Declare Function MKI$ Lib "vbtools.vbx" (ByVal A%)
  63.     Declare Function MKL$ Lib "vbtools.vbx" (ByVal A&)
  64.     Declare Function MKD$ Lib "vbtools.vbx" (A#)
  65.     Declare Function MKDMBF$ Lib "vbtools.vbx" (Doubl#)
  66.     Declare Function MKS$ Lib "vbtools.vbx" (A!)
  67.     Declare Function MKSMBF$ Lib "vbtools.vbx" (Float!)
  68.     Declare Function MKC$ Lib "vbtools.vbx" (A@)
  69.     Declare Function Play% Lib "vbtools.vbx" (ByVal Lin$)
  70.     Declare Sub PlayStop Lib "vbtools.vbx" ()
  71.  
  72. '--------------------------------------------------------------------------
  73. ' These are the SUB and FUNCTION declarations for Windows KEYBOARD.DRV DLL
  74.  
  75.     Declare Function GetKeyboardType% Lib "Keyboard.Drv" (ByVal nTypeFlag%)
  76.  
  77. '--------------------------------------------------------------------------
  78. ' These are the user-defined TYPE declarations for Windows GDI DLL
  79.  
  80.     Type TextMetric ' Used with GetTextMetrics
  81.       TmHeight As Integer
  82.       TmAscent As Integer
  83.       TmDescent As Integer
  84.       TmInternalLeading As Integer
  85.       TmExternalLeading As Integer
  86.       TmAveCharWidth As Integer
  87.       TmMaxCharWidth As Integer
  88.       TmWeight As Integer
  89.       TmItalic As String * 1
  90.       TmUnderlined As String * 1
  91.       TmStruckOut As String * 1
  92.       TmFirstChar As String * 1
  93.       TmLastChar As String * 1
  94.       TmDefaultChar As String * 1
  95.       TmBreakChar As String * 1
  96.       TmPitchAndFamily As String * 1
  97.       TmCharSet As String * 1
  98.       tOverhang As Integer
  99.       TmDigitizedAspectX As Integer
  100.       TmDigitizedAspectY As Integer
  101.     End Type
  102.  
  103. '--------------------------------------------------------------------------
  104. ' These are the SUB and FUNCTION declarations for Windows GDI DLL
  105.  
  106.     Declare Function GetTextExtent& Lib "Gdi" (ByVal hDC%, ByVal lpString$, ByVal nCount%)
  107.     Declare Function BitBlt% Lib "Gdi" (ByVal destDC%, ByVal X%, ByVal Y%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal RasterOp&)
  108.       ' BitBlt moves a bitmap from the
  109.       ' source device to the destination
  110.       ' device. See the CONST section for
  111.       ' values for RasterOp&.
  112.     Declare Function GetTextMetrics% Lib "Gdi" (ByVal hDC%, A As TextMetric)
  113.     Declare Function GetTextCharacterExtra% Lib "Gdi" (ByVal hDC%)
  114.     Declare Function SetStretchBltMode% Lib "Gdi" (ByVal DestHdc%, ByVal StretchMode%)
  115.       ' This function sets the stretching
  116.       ' mode for the StretchBlt function.
  117.       ' The stretching mode determines
  118.       ' which scan lines and/or columns
  119.       ' StretchBlt eliminates when
  120.       ' contracting a bitmap.
  121.       ' StretchMode% is one of:
  122.       Global Const BLACKONWHITE = 1
  123.     ' AND in the eliminated lines.
  124.     ' Preserves black pixels at
  125.     ' the expense of white pixels
  126.     ' by using the AND operator
  127.     ' on the eliminated lines and
  128.     ' those remaining.
  129.       Global Const WHITEONBLACK = 2
  130.     ' OR in the eliminated lines.
  131.     ' Preserves white pixels at
  132.     ' the expense of black pixels
  133.     ' by using the OR operator
  134.     ' on the eliminated lines and
  135.     ' those remaining.
  136.       Global Const COLORONCOLOR = 3
  137.     ' Deletes the eliminated lines
  138.     ' without preserving their
  139.     ' information.
  140.  
  141.     Declare Function SetTextCharacterExtra% Lib "Gdi" (ByVal hDC%, ByVal nCharExtra%)
  142.     Declare Function StretchBlt% Lib "Gdi" (ByVal destDC%, ByVal DestX%, ByVal DestY%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal wSrc%, ByVal hSrc%, ByVal RasterOp&)
  143.       ' StretchBlt moves a bitmap from a
  144.       ' source rectangle to a destination
  145.       ' rectangle, stretching or
  146.       ' compressing the bitmap if
  147.       ' necessary to fit the dimensions
  148.       ' of the destination rectangle.
  149.       ' Also see SetStretchBltMode.
  150.       ' See the CONST section for
  151.       ' values for RasterOp&.
  152.  
  153. '--------------------------------------------------------------------------
  154. ' These are the SUB and FUNCTION declarations for Windows KERNEL DLL
  155.  
  156.     Declare Function GetModuleFileName% Lib "Kernel" (ByVal hModule%, ByVal FileName$, ByVal nSize%)
  157.     Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal Default$, ByVal ReturnedString$, ByVal nSize%, ByVal PFileName$)
  158.     Declare Function LoadLibrary% Lib "Kernel" (ByVal LibName$)
  159.     Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal PString$, ByVal PFileName$)
  160.  
  161. '--------------------------------------------------------------------------
  162. ' These are the SUB and FUNCTION declarations for Windows USER DLL
  163.  
  164.     Declare Sub CreateCaret Lib "User" (ByVal Hwnd%, ByVal hBiTmap%, ByVal nWidth%, ByVal nHeight%)
  165.     Declare Sub DestroyCaret Lib "User" ()
  166.     Declare Function EnableHardwareInput% Lib "User" (ByVal TrueOrFalse%)
  167.     Declare Function ExitWindows% Lib "User" (ByVal dwReserved&, ByVal wReturnCode%)
  168.     Declare Function FlashWindow% Lib "User" (ByVal Hwnd%, ByVal bInvert%)
  169.     Declare Function GetCaretBlinkTime% Lib "User" ()
  170.     Declare Function GetCurrentTime& Lib "User" ()
  171.     Declare Function GetDoubleClickTime% Lib "User" ()
  172.     Declare Function GetFocus% Lib "User" ()
  173.     Declare Function GetInputState% Lib "User" ()
  174.     Declare Function GetKeyState% Lib "User" (ByVal nVirtKey%)
  175.     Declare Function GetMenu% Lib "User" (ByVal Hwnd%)
  176.     Declare Function GetMenuItemID% Lib "User" (ByVal hMenu%, ByVal nPos%)
  177.     Declare Function GetSubMenu% Lib "User" (ByVal hMenu%, ByVal nPos%)
  178.     Declar